home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Icon / c / Shade < prev    next >
Text File  |  1995-07-08  |  527b  |  20 lines

  1. #include "DeskLib:Wimp.h"
  2. #include "DeskLib:WimpSWIs.h"
  3. #include "DeskLib:icon.h"
  4.  
  5.  
  6. extern void Icon_Shade(window_handle window, icon_handle icon)
  7. /*
  8.  * if the icon is currently unshaded (active) it is shaded (made inactive)
  9.  * This includes removing the caret from the icon.
  10.  */
  11. {
  12.   icon_block istate;
  13.  
  14.   Wimp_GetIconState(window, icon, &istate);
  15.   if (!istate.flags.data.shaded)
  16.     Wimp_SetIconState(window, icon, icon_SHADED, icon_SHADED);
  17.  
  18.   Icon_LoseCaret(window, icon);      /* Lose the caret if it is in this icon */
  19. }
  20.